<?php if (!defined('insite')) die("no access"); ?>
 <meta name="robots" content="nofollow" />
 <noindex>
<form action="" method="POST">
<table border="0" cellPadding="4" cellSpacing="2" width="50%" align="center" vAlign="top" style="border:1px solid #9f9562; border-collapse: separate; border-spacing: 2px;empty-cells: hide;">
<?php
	if ($_REQUEST["findbtn"] && (strlen($_POST["loginA"])>2 && strlen($_POST["loginA"])<11 || strlen($_POST["usIP"])))
	{	
				require "opt.php";
				$db = new Connect ($config["ctype"], $config["db_host"], $config["db_name"], $config["db_user"], $config["db_upwd"],$config["odbc_driver"],$config["debug"]); 

		if ($_POST["loginA"])
		{
			$found = validate(substr($_POST["loginA"],0,10));
			$founded = $db->fetcharray($db->query("SELECT ip FROM MEMB_STAT WHERE memb___id='".$found."'"));
			if (!$founded["ip"]){?>
			<tr>
				<td colspan="2" align="center" class="warnms"><?=findip_nores?></td>
			</tr>
			<?}
		}
		if ($_POST["usIP"])
		{
			$found = validate(substr($_POST["usIP"],0,16));
			$foundedip = $db->fetcharray($db->query("SELECT memb___id FROM MEMB_STAT WHERE ip='".$found."'"));
			if (!$foundedip["memb___id"]){?>
			<tr>
				<td colspan="2" align="center" class="warnms"><?=findip_nores?></td>
			</tr>
			<?}
		}
	}
?>

<tr align="center">
	<td><?=forgot_login?></td>
	<td><input type="text" name="loginA" maxlength="10" class="texbx" value="<?=$foundedip["memb___id"]?>"></td>
</tr>
<tr align="center">
	<td><?=findip_ip?></td>
	<td><input type="text" name="usIP" maxlength="16" class="texbx" value="<?=$founded["ip"]?>"></td>
</tr>
<tr>
	<td align="center" colspan="2"><input type="submit" name="findbtn" value="<?=findip_btn?>" class="t-button"></td>
</tr>
</table>
</form>
</noindex>